/**
 * @date 2006-6-6 13:50:22
 *
 */
package org.nanhill.moo.web.controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.nanhill.moo.web.WebNameSpace;
import org.springframework.web.servlet.ModelAndView;

/**
 * @author alin [xalinx at gmail dot com]
 * 
 */
public class LogoutController extends SimpleViewController {
	@Override
	protected ModelAndView handleRequestInternal(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		request.getSession().removeAttribute(WebNameSpace.USER_SESSION);
		request.getSession().invalidate();
		return new ModelAndView(this.getSuccessView());
	}

}
